20. GPIO Commands > 20.9 AT^SSCNT   Start and Stop Pulse Counter

20.9
AT^SSCNT   Start and Stop Pulse Counter
The AT^SSCNT write command serves to read, start, restart and stop the pulse counter.
Syntax
Test Command  
Response(s)
^SSCNT:(list of supported <action>s)
Read Command  
Response(s)
Write Command  
Response(s)
If <action>=0 or 1:
If <action>=2 or 3:
"^SSCNT" URC with parameter <pulse>
Reference(s) 
PIN 
ASC0 
ASC1 
USB 
MUX1 
MUX2 
MUX3 
Charge 
Last 

Unsolicited Result Code
^SSCNT: <pulse>
The URC applies only to the Start-Stop mode set with AT^SCCNT, parameter <mode>=0. It is delivered once the pulse counter result was requested with <action>=2 or the pulse counter was stopped with <action>=3. The URC indicates the number of pulses counted.

Parameter Description
 
This parameter can only be used after configuring the pulse counter with AT^SCCNT. The <action> types 0, 1 and 2 apply only to the Start-Stop counter mode set with AT^SCCNT.
0
Reset and start pulse counter from 0.
1
Restart pulse counter and continue counting from the <pulse> value of the last run.
2
Read out current <pulse> value.
3
The effect of value 3 depends on the selected counter mode:
If AT^SCCNT, parameter <mode>= 0 (Start-Stop counter mode), then <action> type 3 stops the pulse counter and displays, as "^SSCNT" URC, the number of pulses counted until this time.
If AT^SCCNT, parameter <mode>= 1 (Limit counter mode), then <action> type 3 immediately stops the pulse counter without indicating the "^SCCNT" URC. This action has the same effect as the command AT^SCCNT=0,0.
 
<pulse>(num)
Measurement result of the pulse counter in Start-Stop mode, indicated within the "^SSCNT" URC, if AT^SCCNT, parameter <action>=2 or 3. The value range of <pulse> is 32 bits (232-1).
0...4294967295
Number of pulses counted.


Note
•
Measurement accuracy: In Start-Stop mode, you can achieve 100% accuracy if you take care that pulse transmission begins after the start command (AT^SSCNT=0 or 1) has returned OK and ends before the stop command (AT^SSCNT=3) is issued.